package com.demomaster.quickcompat.view.menu;

import android.graphics.drawable.Drawable;
import android.view.MenuItem;

/**
 * 菜单子项目
 */
public class NavMenuItem {
    private CharSequence title;
    private int iconId;
    private Drawable icon;
    private int iconWidth;
    private int iconPadding;
    private MenuItem menuItem;

    public NavMenuItem(MenuItem item) {
        this.menuItem = item;
        if(item!=null){
            title = item.getTitle();
            icon = item.getIcon();
        }
    }

    public CharSequence getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getIconId() {
        return iconId;
    }

    public void setIconId(int iconId) {
        this.iconId = iconId;
    }

    public int getIconWidth() {
        return iconWidth;
    }

    public void setIconWidth(int iconWidth) {
        this.iconWidth = iconWidth;
    }

    public int getIconPadding() {
        return iconPadding;
    }

    public void setIconPadding(int iconPadding) {
        this.iconPadding = iconPadding;
    }

    public Drawable getIcon() {
        return icon;
    }

    public void setIcon(Drawable icon) {
        this.icon = icon;
    }

    public void setTitle(CharSequence title) {
        this.title = title;
    }

    public MenuItem getMenuItem() {
        return menuItem;
    }

    public void setMenuItem(MenuItem menuItem) {
        this.menuItem = menuItem;
    }
}